.class public abstract Lorg/jboss/netty/buffer/AbstractChannelBuffer;
.super Ljava/lang/Object;
.source "AbstractChannelBuffer.java"

# interfaces
.implements Lorg/jboss/netty/buffer/ChannelBuffer;


# instance fields
.field private markedReaderIndex:I

.field private markedWriterIndex:I

.field private readerIndex:I

.field private writerIndex:I


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 31
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public bytesBefore(B)I
    .locals 2
    .parameter "value"

    .prologue
    .line 585
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex()I

    move-result v0

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readableBytes()I

    move-result v1

    invoke-virtual {p0, v0, v1, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->bytesBefore(IIB)I

    move-result v0

    return v0
.end method

.method public bytesBefore(IB)I
    .locals 1
    .parameter "length"
    .parameter "value"

    .prologue
    .line 593
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->checkReadableBytes(I)V

    .line 594
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex()I

    move-result v0

    invoke-virtual {p0, v0, p1, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->bytesBefore(IIB)I

    move-result v0

    return v0
.end method

.method public bytesBefore(IIB)I
    .locals 2
    .parameter "index"
    .parameter "length"
    .parameter "value"

    .prologue
    .line 603
    add-int v1, p1, p2

    invoke-virtual {p0, p1, v1, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->indexOf(IIB)I

    move-result v0

    .line 604
    .local v0, endIndex:I
    if-gez v0, :cond_0

    .line 605
    const/4 v1, -0x1

    .line 607
    :goto_0
    return v1

    :cond_0
    sub-int v1, v0, p1

    goto :goto_0
.end method

.method public bytesBefore(IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I
    .locals 2
    .parameter "index"
    .parameter "length"
    .parameter "indexFinder"

    .prologue
    .line 612
    add-int v1, p1, p2

    invoke-virtual {p0, p1, v1, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->indexOf(IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I

    move-result v0

    .line 613
    .local v0, endIndex:I
    if-gez v0, :cond_0

    .line 614
    const/4 v1, -0x1

    .line 616
    :goto_0
    return v1

    :cond_0
    sub-int v1, v0, p1

    goto :goto_0
.end method

.method public bytesBefore(ILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I
    .locals 1
    .parameter "length"
    .parameter "indexFinder"

    .prologue
    .line 598
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->checkReadableBytes(I)V

    .line 599
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex()I

    move-result v0

    invoke-virtual {p0, v0, p1, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->bytesBefore(IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I

    move-result v0

    return v0
.end method

.method public bytesBefore(Lorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I
    .locals 2
    .parameter "indexFinder"

    .prologue
    .line 589
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex()I

    move-result v0

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readableBytes()I

    move-result v1

    invoke-virtual {p0, v0, v1, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->bytesBefore(IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I

    move-result v0

    return v0
.end method

.method protected checkReadableBytes(I)V
    .locals 1
    .parameter "minimumReadableBytes"

    .prologue
    .line 651
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readableBytes()I

    move-result v0

    if-ge v0, p1, :cond_0

    .line 652
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v0

    .line 654
    :cond_0
    return-void
.end method

.method public clear()V
    .locals 1

    .prologue
    .line 69
    const/4 v0, 0x0

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 70
    return-void
.end method

.method public bridge synthetic compareTo(Ljava/lang/Object;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 31
    check-cast p1, Lorg/jboss/netty/buffer/ChannelBuffer;

    .end local p1
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->compareTo(Lorg/jboss/netty/buffer/ChannelBuffer;)I

    move-result v0

    return v0
.end method

.method public compareTo(Lorg/jboss/netty/buffer/ChannelBuffer;)I
    .locals 1
    .parameter "that"

    .prologue
    .line 633
    invoke-static {p0, p1}, Lorg/jboss/netty/buffer/ChannelBuffers;->compare(Lorg/jboss/netty/buffer/ChannelBuffer;Lorg/jboss/netty/buffer/ChannelBuffer;)I

    move-result v0

    return v0
.end method

.method public copy()Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 2

    .prologue
    .line 513
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readableBytes()I

    move-result v1

    invoke-virtual {p0, v0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->copy(II)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public discardReadBytes()V
    .locals 4

    .prologue
    const/4 v3, 0x0

    .line 105
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    if-nez v0, :cond_0

    .line 113
    :goto_0
    return-void

    .line 108
    :cond_0
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    iget v2, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    sub-int/2addr v1, v2

    invoke-virtual {p0, v3, p0, v0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setBytes(ILorg/jboss/netty/buffer/ChannelBuffer;II)V

    .line 109
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    sub-int/2addr v0, v1

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 110
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->markedReaderIndex:I

    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    sub-int/2addr v0, v1

    invoke-static {v0, v3}, Ljava/lang/Math;->max(II)I

    move-result v0

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->markedReaderIndex:I

    .line 111
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->markedWriterIndex:I

    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    sub-int/2addr v0, v1

    invoke-static {v0, v3}, Ljava/lang/Math;->max(II)I

    move-result v0

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->markedWriterIndex:I

    .line 112
    iput v3, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    goto :goto_0
.end method

.method public ensureWritableBytes(I)V
    .locals 1
    .parameter "writableBytes"

    .prologue
    .line 116
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writableBytes()I

    move-result v0

    if-le p1, v0, :cond_0

    .line 117
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v0

    .line 119
    :cond_0
    return-void
.end method

.method public equals(Ljava/lang/Object;)Z
    .locals 1
    .parameter "o"

    .prologue
    .line 626
    instance-of v0, p1, Lorg/jboss/netty/buffer/ChannelBuffer;

    if-nez v0, :cond_0

    .line 627
    const/4 v0, 0x0

    .line 629
    .end local p1
    :goto_0
    return v0

    .restart local p1
    :cond_0
    check-cast p1, Lorg/jboss/netty/buffer/ChannelBuffer;

    .end local p1
    invoke-static {p0, p1}, Lorg/jboss/netty/buffer/ChannelBuffers;->equals(Lorg/jboss/netty/buffer/ChannelBuffer;Lorg/jboss/netty/buffer/ChannelBuffer;)Z

    move-result v0

    goto :goto_0
.end method

.method public getBytes(ILorg/jboss/netty/buffer/ChannelBuffer;)V
    .locals 1
    .parameter "index"
    .parameter "dst"

    .prologue
    .line 158
    invoke-interface {p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->writableBytes()I

    move-result v0

    invoke-virtual {p0, p1, p2, v0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getBytes(ILorg/jboss/netty/buffer/ChannelBuffer;I)V

    .line 159
    return-void
.end method

.method public getBytes(ILorg/jboss/netty/buffer/ChannelBuffer;I)V
    .locals 1
    .parameter "index"
    .parameter "dst"
    .parameter "length"

    .prologue
    .line 162
    invoke-interface {p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->writableBytes()I

    move-result v0

    if-le p3, v0, :cond_0

    .line 163
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v0

    .line 165
    :cond_0
    invoke-interface {p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->writerIndex()I

    move-result v0

    invoke-virtual {p0, p1, p2, v0, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getBytes(ILorg/jboss/netty/buffer/ChannelBuffer;II)V

    .line 166
    invoke-interface {p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->writerIndex()I

    move-result v0

    add-int/2addr v0, p3

    invoke-interface {p2, v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->writerIndex(I)V

    .line 167
    return-void
.end method

.method public getBytes(I[B)V
    .locals 2
    .parameter "index"
    .parameter "dst"

    .prologue
    .line 154
    const/4 v0, 0x0

    array-length v1, p2

    invoke-virtual {p0, p1, p2, v0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getBytes(I[BII)V

    .line 155
    return-void
.end method

.method public getChar(I)C
    .locals 1
    .parameter "index"

    .prologue
    .line 142
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getShort(I)S

    move-result v0

    int-to-char v0, v0

    return v0
.end method

.method public getDouble(I)D
    .locals 2
    .parameter "index"

    .prologue
    .line 150
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getLong(I)J

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->longBitsToDouble(J)D

    move-result-wide v0

    return-wide v0
.end method

.method public getFloat(I)F
    .locals 1
    .parameter "index"

    .prologue
    .line 146
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getInt(I)I

    move-result v0

    invoke-static {v0}, Ljava/lang/Float;->intBitsToFloat(I)F

    move-result v0

    return v0
.end method

.method public getMedium(I)I
    .locals 2
    .parameter "index"

    .prologue
    .line 130
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getUnsignedMedium(I)I

    move-result v0

    .line 131
    .local v0, value:I
    const/high16 v1, 0x80

    and-int/2addr v1, v0

    if-eqz v1, :cond_0

    .line 132
    const/high16 v1, -0x100

    or-int/2addr v0, v1

    .line 134
    :cond_0
    return v0
.end method

.method public getUnsignedByte(I)S
    .locals 1
    .parameter "index"

    .prologue
    .line 122
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getByte(I)B

    move-result v0

    and-int/lit16 v0, v0, 0xff

    int-to-short v0, v0

    return v0
.end method

.method public getUnsignedInt(I)J
    .locals 4
    .parameter "index"

    .prologue
    .line 138
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getInt(I)I

    move-result v0

    int-to-long v0, v0

    const-wide v2, 0xffffffffL

    and-long/2addr v0, v2

    return-wide v0
.end method

.method public getUnsignedShort(I)I
    .locals 2
    .parameter "index"

    .prologue
    .line 126
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getShort(I)S

    move-result v0

    const v1, 0xffff

    and-int/2addr v0, v1

    return v0
.end method

.method public hashCode()I
    .locals 1

    .prologue
    .line 621
    invoke-static {p0}, Lorg/jboss/netty/buffer/ChannelBuffers;->hashCode(Lorg/jboss/netty/buffer/ChannelBuffer;)I

    move-result v0

    return v0
.end method

.method public indexOf(IIB)I
    .locals 1
    .parameter "fromIndex"
    .parameter "toIndex"
    .parameter "value"

    .prologue
    .line 577
    invoke-static {p0, p1, p2, p3}, Lorg/jboss/netty/buffer/ChannelBuffers;->indexOf(Lorg/jboss/netty/buffer/ChannelBuffer;IIB)I

    move-result v0

    return v0
.end method

.method public indexOf(IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I
    .locals 1
    .parameter "fromIndex"
    .parameter "toIndex"
    .parameter "indexFinder"

    .prologue
    .line 581
    invoke-static {p0, p1, p2, p3}, Lorg/jboss/netty/buffer/ChannelBuffers;->indexOf(Lorg/jboss/netty/buffer/ChannelBuffer;IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I

    move-result v0

    return v0
.end method

.method public markReaderIndex()V
    .locals 1

    .prologue
    .line 89
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->markedReaderIndex:I

    .line 90
    return-void
.end method

.method public markWriterIndex()V
    .locals 1

    .prologue
    .line 97
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->markedWriterIndex:I

    .line 98
    return-void
.end method

.method public readByte()B
    .locals 2

    .prologue
    .line 230
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    if-ne v0, v1, :cond_0

    .line 231
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v0

    .line 233
    :cond_0
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int/lit8 v1, v0, 0x1

    iput v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0, v0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getByte(I)B

    move-result v0

    return v0
.end method

.method public readBytes(Ljava/nio/channels/GatheringByteChannel;I)I
    .locals 2
    .parameter "out"
    .parameter "length"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 368
    invoke-virtual {p0, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->checkReadableBytes(I)V

    .line 369
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0, v1, p1, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getBytes(ILjava/nio/channels/GatheringByteChannel;I)I

    move-result v0

    .line 370
    .local v0, readBytes:I
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int/2addr v1, v0

    iput v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 371
    return v0
.end method

.method public readBytes(I)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 3
    .parameter "length"

    .prologue
    .line 297
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->checkReadableBytes(I)V

    .line 298
    if-nez p1, :cond_0

    .line 299
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 304
    :goto_0
    return-object v0

    .line 301
    :cond_0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->factory()Lorg/jboss/netty/buffer/ChannelBufferFactory;

    move-result-object v1

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v2

    invoke-interface {v1, v2, p1}, Lorg/jboss/netty/buffer/ChannelBufferFactory;->getBuffer(Ljava/nio/ByteOrder;I)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    .line 302
    .local v0, buf:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-interface {v0, p0, v1, p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->writeBytes(Lorg/jboss/netty/buffer/ChannelBuffer;II)V

    .line 303
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int/2addr v1, p1

    iput v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    goto :goto_0
.end method

.method public readBytes(Lorg/jboss/netty/buffer/ChannelBufferIndexFinder;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 3
    .parameter "endIndexFinder"
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 309
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    iget v2, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v1, v2, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->indexOf(IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I

    move-result v0

    .line 310
    .local v0, endIndex:I
    if-gez v0, :cond_0

    .line 311
    new-instance v1, Ljava/util/NoSuchElementException;

    invoke-direct {v1}, Ljava/util/NoSuchElementException;-><init>()V

    throw v1

    .line 313
    :cond_0
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    sub-int v1, v0, v1

    invoke-virtual {p0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readBytes(I)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v1

    return-object v1
.end method

.method public readBytes(Ljava/io/OutputStream;I)V
    .locals 1
    .parameter "out"
    .parameter "length"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 375
    invoke-virtual {p0, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->checkReadableBytes(I)V

    .line 376
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0, v0, p1, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getBytes(ILjava/io/OutputStream;I)V

    .line 377
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int/2addr v0, p2

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 378
    return-void
.end method

.method public readBytes(Ljava/nio/ByteBuffer;)V
    .locals 2
    .parameter "dst"

    .prologue
    .line 360
    invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v0

    .line 361
    .local v0, length:I
    invoke-virtual {p0, v0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->checkReadableBytes(I)V

    .line 362
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0, v1, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getBytes(ILjava/nio/ByteBuffer;)V

    .line 363
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int/2addr v1, v0

    iput v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 364
    return-void
.end method

.method public readBytes(Lorg/jboss/netty/buffer/ChannelBuffer;)V
    .locals 1
    .parameter "dst"

    .prologue
    .line 342
    invoke-interface {p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->writableBytes()I

    move-result v0

    invoke-virtual {p0, p1, v0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readBytes(Lorg/jboss/netty/buffer/ChannelBuffer;I)V

    .line 343
    return-void
.end method

.method public readBytes(Lorg/jboss/netty/buffer/ChannelBuffer;I)V
    .locals 1
    .parameter "dst"
    .parameter "length"

    .prologue
    .line 346
    invoke-interface {p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->writableBytes()I

    move-result v0

    if-le p2, v0, :cond_0

    .line 347
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v0

    .line 349
    :cond_0
    invoke-interface {p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->writerIndex()I

    move-result v0

    invoke-virtual {p0, p1, v0, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readBytes(Lorg/jboss/netty/buffer/ChannelBuffer;II)V

    .line 350
    invoke-interface {p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->writerIndex()I

    move-result v0

    add-int/2addr v0, p2

    invoke-interface {p1, v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->writerIndex(I)V

    .line 351
    return-void
.end method

.method public readBytes(Lorg/jboss/netty/buffer/ChannelBuffer;II)V
    .locals 1
    .parameter "dst"
    .parameter "dstIndex"
    .parameter "length"

    .prologue
    .line 354
    invoke-virtual {p0, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->checkReadableBytes(I)V

    .line 355
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0, v0, p1, p2, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getBytes(ILorg/jboss/netty/buffer/ChannelBuffer;II)V

    .line 356
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int/2addr v0, p3

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 357
    return-void
.end method

.method public readBytes([B)V
    .locals 2
    .parameter "dst"

    .prologue
    .line 338
    const/4 v0, 0x0

    array-length v1, p1

    invoke-virtual {p0, p1, v0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readBytes([BII)V

    .line 339
    return-void
.end method

.method public readBytes([BII)V
    .locals 1
    .parameter "dst"
    .parameter "dstIndex"
    .parameter "length"

    .prologue
    .line 332
    invoke-virtual {p0, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->checkReadableBytes(I)V

    .line 333
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0, v0, p1, p2, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getBytes(I[BII)V

    .line 334
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int/2addr v0, p3

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 335
    return-void
.end method

.method public readChar()C
    .locals 1

    .prologue
    .line 285
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readShort()S

    move-result v0

    int-to-char v0, v0

    return v0
.end method

.method public readDouble()D
    .locals 2

    .prologue
    .line 293
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readLong()J

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Double;->longBitsToDouble(J)D

    move-result-wide v0

    return-wide v0
.end method

.method public readFloat()F
    .locals 1

    .prologue
    .line 289
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readInt()I

    move-result v0

    invoke-static {v0}, Ljava/lang/Float;->intBitsToFloat(I)F

    move-result v0

    return v0
.end method

.method public readInt()I
    .locals 2

    .prologue
    .line 267
    const/4 v1, 0x4

    invoke-virtual {p0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->checkReadableBytes(I)V

    .line 268
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getInt(I)I

    move-result v0

    .line 269
    .local v0, v:I
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int/lit8 v1, v1, 0x4

    iput v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 270
    return v0
.end method

.method public readLong()J
    .locals 3

    .prologue
    .line 278
    const/16 v2, 0x8

    invoke-virtual {p0, v2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->checkReadableBytes(I)V

    .line 279
    iget v2, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0, v2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getLong(I)J

    move-result-wide v0

    .line 280
    .local v0, v:J
    iget v2, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int/lit8 v2, v2, 0x8

    iput v2, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 281
    return-wide v0
.end method

.method public readMedium()I
    .locals 2

    .prologue
    .line 252
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readUnsignedMedium()I

    move-result v0

    .line 253
    .local v0, value:I
    const/high16 v1, 0x80

    and-int/2addr v1, v0

    if-eqz v1, :cond_0

    .line 254
    const/high16 v1, -0x100

    or-int/2addr v0, v1

    .line 256
    :cond_0
    return v0
.end method

.method public readShort()S
    .locals 2

    .prologue
    .line 241
    const/4 v1, 0x2

    invoke-virtual {p0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->checkReadableBytes(I)V

    .line 242
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getShort(I)S

    move-result v0

    .line 243
    .local v0, v:S
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int/lit8 v1, v1, 0x2

    iput v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 244
    return v0
.end method

.method public readSlice(I)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 2
    .parameter "length"

    .prologue
    .line 317
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0, v1, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->slice(II)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    .line 318
    .local v0, slice:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int/2addr v1, p1

    iput v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 319
    return-object v0
.end method

.method public readSlice(Lorg/jboss/netty/buffer/ChannelBufferIndexFinder;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 3
    .parameter "endIndexFinder"
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 324
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    iget v2, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v1, v2, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->indexOf(IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I

    move-result v0

    .line 325
    .local v0, endIndex:I
    if-gez v0, :cond_0

    .line 326
    new-instance v1, Ljava/util/NoSuchElementException;

    invoke-direct {v1}, Ljava/util/NoSuchElementException;-><init>()V

    throw v1

    .line 328
    :cond_0
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    sub-int v1, v0, v1

    invoke-virtual {p0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readSlice(I)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v1

    return-object v1
.end method

.method public readUnsignedByte()S
    .locals 1

    .prologue
    .line 237
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readByte()B

    move-result v0

    and-int/lit16 v0, v0, 0xff

    int-to-short v0, v0

    return v0
.end method

.method public readUnsignedInt()J
    .locals 4

    .prologue
    .line 274
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readInt()I

    move-result v0

    int-to-long v0, v0

    const-wide v2, 0xffffffffL

    and-long/2addr v0, v2

    return-wide v0
.end method

.method public readUnsignedMedium()I
    .locals 2

    .prologue
    .line 260
    const/4 v1, 0x3

    invoke-virtual {p0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->checkReadableBytes(I)V

    .line 261
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->getUnsignedMedium(I)I

    move-result v0

    .line 262
    .local v0, v:I
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int/lit8 v1, v1, 0x3

    iput v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 263
    return v0
.end method

.method public readUnsignedShort()I
    .locals 2

    .prologue
    .line 248
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readShort()S

    move-result v0

    const v1, 0xffff

    and-int/2addr v0, v1

    return v0
.end method

.method public readable()Z
    .locals 1

    .prologue
    .line 73
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readableBytes()I

    move-result v0

    if-lez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public readableBytes()I
    .locals 2

    .prologue
    .line 81
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    sub-int/2addr v0, v1

    return v0
.end method

.method public readerIndex()I
    .locals 1

    .prologue
    .line 39
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    return v0
.end method

.method public readerIndex(I)V
    .locals 1
    .parameter "readerIndex"

    .prologue
    .line 43
    if-ltz p1, :cond_0

    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    if-le p1, v0, :cond_1

    .line 44
    :cond_0
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v0

    .line 46
    :cond_1
    iput p1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 47
    return-void
.end method

.method public resetReaderIndex()V
    .locals 1

    .prologue
    .line 93
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->markedReaderIndex:I

    invoke-virtual {p0, v0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex(I)V

    .line 94
    return-void
.end method

.method public resetWriterIndex()V
    .locals 1

    .prologue
    .line 101
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->markedWriterIndex:I

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 102
    return-void
.end method

.method public setBytes(ILorg/jboss/netty/buffer/ChannelBuffer;)V
    .locals 1
    .parameter "index"
    .parameter "src"

    .prologue
    .line 186
    invoke-interface {p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->readableBytes()I

    move-result v0

    invoke-virtual {p0, p1, p2, v0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setBytes(ILorg/jboss/netty/buffer/ChannelBuffer;I)V

    .line 187
    return-void
.end method

.method public setBytes(ILorg/jboss/netty/buffer/ChannelBuffer;I)V
    .locals 1
    .parameter "index"
    .parameter "src"
    .parameter "length"

    .prologue
    .line 190
    invoke-interface {p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->readableBytes()I

    move-result v0

    if-le p3, v0, :cond_0

    .line 191
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v0

    .line 193
    :cond_0
    invoke-interface {p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v0

    invoke-virtual {p0, p1, p2, v0, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setBytes(ILorg/jboss/netty/buffer/ChannelBuffer;II)V

    .line 194
    invoke-interface {p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v0

    add-int/2addr v0, p3

    invoke-interface {p2, v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex(I)V

    .line 195
    return-void
.end method

.method public setBytes(I[B)V
    .locals 2
    .parameter "index"
    .parameter "src"

    .prologue
    .line 182
    const/4 v0, 0x0

    array-length v1, p2

    invoke-virtual {p0, p1, p2, v0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setBytes(I[BII)V

    .line 183
    return-void
.end method

.method public setChar(II)V
    .locals 0
    .parameter "index"
    .parameter "value"

    .prologue
    .line 170
    invoke-virtual {p0, p1, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setShort(II)V

    .line 171
    return-void
.end method

.method public setDouble(ID)V
    .locals 2
    .parameter "index"
    .parameter "value"

    .prologue
    .line 178
    invoke-static {p2, p3}, Ljava/lang/Double;->doubleToRawLongBits(D)J

    move-result-wide v0

    invoke-virtual {p0, p1, v0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setLong(IJ)V

    .line 179
    return-void
.end method

.method public setFloat(IF)V
    .locals 1
    .parameter "index"
    .parameter "value"

    .prologue
    .line 174
    invoke-static {p2}, Ljava/lang/Float;->floatToRawIntBits(F)I

    move-result v0

    invoke-virtual {p0, p1, v0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setInt(II)V

    .line 175
    return-void
.end method

.method public setIndex(II)V
    .locals 1
    .parameter "readerIndex"
    .parameter "writerIndex"

    .prologue
    .line 61
    if-ltz p1, :cond_0

    if-gt p1, p2, :cond_0

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->capacity()I

    move-result v0

    if-le p2, v0, :cond_1

    .line 62
    :cond_0
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v0

    .line 64
    :cond_1
    iput p1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 65
    iput p2, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 66
    return-void
.end method

.method public setZero(II)V
    .locals 7
    .parameter "index"
    .parameter "length"

    .prologue
    const/4 v6, 0x4

    const/4 v5, 0x0

    .line 198
    if-nez p2, :cond_1

    .line 227
    :cond_0
    :goto_0
    return-void

    .line 201
    :cond_1
    if-gez p2, :cond_2

    .line 202
    new-instance v3, Ljava/lang/IllegalArgumentException;

    const-string v4, "length must be 0 or greater than 0."

    invoke-direct {v3, v4}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v3

    .line 206
    :cond_2
    ushr-int/lit8 v2, p2, 0x3

    .line 207
    .local v2, nLong:I
    and-int/lit8 v1, p2, 0x7

    .line 208
    .local v1, nBytes:I
    move v0, v2

    .local v0, i:I
    :goto_1
    if-lez v0, :cond_3

    .line 209
    const-wide/16 v3, 0x0

    invoke-virtual {p0, p1, v3, v4}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setLong(IJ)V

    .line 210
    add-int/lit8 p1, p1, 0x8

    .line 208
    add-int/lit8 v0, v0, -0x1

    goto :goto_1

    .line 212
    :cond_3
    if-ne v1, v6, :cond_4

    .line 213
    invoke-virtual {p0, p1, v5}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setInt(II)V

    goto :goto_0

    .line 214
    :cond_4
    if-ge v1, v6, :cond_5

    .line 215
    move v0, v1

    :goto_2
    if-lez v0, :cond_0

    .line 216
    invoke-virtual {p0, p1, v5}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setByte(II)V

    .line 217
    add-int/lit8 p1, p1, 0x1

    .line 215
    add-int/lit8 v0, v0, -0x1

    goto :goto_2

    .line 220
    :cond_5
    invoke-virtual {p0, p1, v5}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setInt(II)V

    .line 221
    add-int/lit8 p1, p1, 0x4

    .line 222
    add-int/lit8 v0, v1, -0x4

    :goto_3
    if-lez v0, :cond_0

    .line 223
    invoke-virtual {p0, p1, v5}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setByte(II)V

    .line 224
    add-int/lit8 p1, p1, 0x1

    .line 222
    add-int/lit8 v0, v0, -0x1

    goto :goto_3
.end method

.method public skipBytes(Lorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I
    .locals 3
    .parameter "firstIndexFinder"
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 390
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 391
    .local v1, oldReaderIndex:I
    iget v2, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v1, v2, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->indexOf(IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I

    move-result v0

    .line 392
    .local v0, newReaderIndex:I
    if-gez v0, :cond_0

    .line 393
    new-instance v2, Ljava/util/NoSuchElementException;

    invoke-direct {v2}, Ljava/util/NoSuchElementException;-><init>()V

    throw v2

    .line 395
    :cond_0
    invoke-virtual {p0, v0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex(I)V

    .line 396
    sub-int v2, v0, v1

    return v2
.end method

.method public skipBytes(I)V
    .locals 2
    .parameter "length"

    .prologue
    .line 381
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    add-int v0, v1, p1

    .line 382
    .local v0, newReaderIndex:I
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    if-le v0, v1, :cond_0

    .line 383
    new-instance v1, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v1}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v1

    .line 385
    :cond_0
    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    .line 386
    return-void
.end method

.method public slice()Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 2

    .prologue
    .line 517
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readableBytes()I

    move-result v1

    invoke-virtual {p0, v0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->slice(II)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public toByteBuffer()Ljava/nio/ByteBuffer;
    .locals 2

    .prologue
    .line 521
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readableBytes()I

    move-result v1

    invoke-virtual {p0, v0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->toByteBuffer(II)Ljava/nio/ByteBuffer;

    move-result-object v0

    return-object v0
.end method

.method public toByteBuffers()[Ljava/nio/ByteBuffer;
    .locals 2

    .prologue
    .line 525
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readableBytes()I

    move-result v1

    invoke-virtual {p0, v0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->toByteBuffers(II)[Ljava/nio/ByteBuffer;

    move-result-object v0

    return-object v0
.end method

.method public toByteBuffers(II)[Ljava/nio/ByteBuffer;
    .locals 3
    .parameter "index"
    .parameter "length"

    .prologue
    .line 529
    const/4 v0, 0x1

    new-array v0, v0, [Ljava/nio/ByteBuffer;

    const/4 v1, 0x0

    invoke-virtual {p0, p1, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->toByteBuffer(II)Ljava/nio/ByteBuffer;

    move-result-object v2

    aput-object v2, v0, v1

    return-object v0
.end method

.method public toString()Ljava/lang/String;
    .locals 2

    .prologue
    .line 638
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const/16 v1, 0x28

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "ridx="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ", "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "widx="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ", "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "cap="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->capacity()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const/16 v1, 0x29

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public toString(IILjava/lang/String;)Ljava/lang/String;
    .locals 1
    .parameter "index"
    .parameter "length"
    .parameter "charsetName"
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 562
    invoke-static {p3}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;

    move-result-object v0

    invoke-virtual {p0, p1, p2, v0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->toString(IILjava/nio/charset/Charset;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public toString(IILjava/lang/String;Lorg/jboss/netty/buffer/ChannelBufferIndexFinder;)Ljava/lang/String;
    .locals 2
    .parameter "index"
    .parameter "length"
    .parameter "charsetName"
    .parameter "terminatorFinder"
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 548
    if-nez p4, :cond_0

    .line 549
    invoke-virtual {p0, p1, p2, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->toString(IILjava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 557
    :goto_0
    return-object v1

    .line 552
    :cond_0
    add-int v1, p1, p2

    invoke-virtual {p0, p1, v1, p4}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->indexOf(IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I

    move-result v0

    .line 553
    .local v0, terminatorIndex:I
    if-gez v0, :cond_1

    .line 554
    invoke-virtual {p0, p1, p2, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->toString(IILjava/lang/String;)Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    .line 557
    :cond_1
    sub-int v1, v0, p1

    invoke-virtual {p0, p1, v1, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->toString(IILjava/lang/String;)Ljava/lang/String;

    move-result-object v1

    goto :goto_0
.end method

.method public toString(IILjava/nio/charset/Charset;)Ljava/lang/String;
    .locals 1
    .parameter "index"
    .parameter "length"
    .parameter "charset"

    .prologue
    .line 537
    if-nez p2, :cond_0

    .line 538
    const-string v0, ""

    .line 541
    :goto_0
    return-object v0

    :cond_0
    invoke-virtual {p0, p1, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->toByteBuffer(II)Ljava/nio/ByteBuffer;

    move-result-object v0

    invoke-static {v0, p3}, Lorg/jboss/netty/buffer/ChannelBuffers;->decodeString(Ljava/nio/ByteBuffer;Ljava/nio/charset/Charset;)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public toString(Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .parameter "charsetName"
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 573
    invoke-static {p1}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;

    move-result-object v0

    invoke-virtual {p0, v0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->toString(Ljava/nio/charset/Charset;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public toString(Ljava/lang/String;Lorg/jboss/netty/buffer/ChannelBufferIndexFinder;)Ljava/lang/String;
    .locals 2
    .parameter "charsetName"
    .parameter "terminatorFinder"
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 568
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readableBytes()I

    move-result v1

    invoke-virtual {p0, v0, v1, p1, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->toString(IILjava/lang/String;Lorg/jboss/netty/buffer/ChannelBufferIndexFinder;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public toString(Ljava/nio/charset/Charset;)Ljava/lang/String;
    .locals 2
    .parameter "charset"

    .prologue
    .line 533
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readableBytes()I

    move-result v1

    invoke-virtual {p0, v0, v1, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->toString(IILjava/nio/charset/Charset;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public writable()Z
    .locals 1

    .prologue
    .line 77
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writableBytes()I

    move-result v0

    if-lez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public writableBytes()I
    .locals 2

    .prologue
    .line 85
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->capacity()I

    move-result v0

    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    sub-int/2addr v0, v1

    return v0
.end method

.method public writeByte(I)V
    .locals 2
    .parameter "value"

    .prologue
    .line 400
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    add-int/lit8 v1, v0, 0x1

    iput v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setByte(II)V

    .line 401
    return-void
.end method

.method public writeBytes(Ljava/io/InputStream;I)I
    .locals 2
    .parameter "in"
    .parameter "length"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 469
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v1, p1, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setBytes(ILjava/io/InputStream;I)I

    move-result v0

    .line 470
    .local v0, writtenBytes:I
    if-lez v0, :cond_0

    .line 471
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    add-int/2addr v1, v0

    iput v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 473
    :cond_0
    return v0
.end method

.method public writeBytes(Ljava/nio/channels/ScatteringByteChannel;I)I
    .locals 2
    .parameter "in"
    .parameter "length"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 478
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v1, p1, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setBytes(ILjava/nio/channels/ScatteringByteChannel;I)I

    move-result v0

    .line 479
    .local v0, writtenBytes:I
    if-lez v0, :cond_0

    .line 480
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    add-int/2addr v1, v0

    iput v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 482
    :cond_0
    return v0
.end method

.method public writeBytes(Ljava/nio/ByteBuffer;)V
    .locals 2
    .parameter "src"

    .prologue
    .line 462
    invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v0

    .line 463
    .local v0, length:I
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v1, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setBytes(ILjava/nio/ByteBuffer;)V

    .line 464
    iget v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    add-int/2addr v1, v0

    iput v1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 465
    return-void
.end method

.method public writeBytes(Lorg/jboss/netty/buffer/ChannelBuffer;)V
    .locals 1
    .parameter "src"

    .prologue
    .line 445
    invoke-interface {p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->readableBytes()I

    move-result v0

    invoke-virtual {p0, p1, v0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writeBytes(Lorg/jboss/netty/buffer/ChannelBuffer;I)V

    .line 446
    return-void
.end method

.method public writeBytes(Lorg/jboss/netty/buffer/ChannelBuffer;I)V
    .locals 1
    .parameter "src"
    .parameter "length"

    .prologue
    .line 449
    invoke-interface {p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->readableBytes()I

    move-result v0

    if-le p2, v0, :cond_0

    .line 450
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v0

    .line 452
    :cond_0
    invoke-interface {p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v0

    invoke-virtual {p0, p1, v0, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writeBytes(Lorg/jboss/netty/buffer/ChannelBuffer;II)V

    .line 453
    invoke-interface {p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v0

    add-int/2addr v0, p2

    invoke-interface {p1, v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex(I)V

    .line 454
    return-void
.end method

.method public writeBytes(Lorg/jboss/netty/buffer/ChannelBuffer;II)V
    .locals 1
    .parameter "src"
    .parameter "srcIndex"
    .parameter "length"

    .prologue
    .line 457
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v0, p1, p2, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setBytes(ILorg/jboss/netty/buffer/ChannelBuffer;II)V

    .line 458
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    add-int/2addr v0, p3

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 459
    return-void
.end method

.method public writeBytes([B)V
    .locals 2
    .parameter "src"

    .prologue
    .line 441
    const/4 v0, 0x0

    array-length v1, p1

    invoke-virtual {p0, p1, v0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writeBytes([BII)V

    .line 442
    return-void
.end method

.method public writeBytes([BII)V
    .locals 1
    .parameter "src"
    .parameter "srcIndex"
    .parameter "length"

    .prologue
    .line 436
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v0, p1, p2, p3}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setBytes(I[BII)V

    .line 437
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    add-int/2addr v0, p3

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 438
    return-void
.end method

.method public writeChar(I)V
    .locals 0
    .parameter "value"

    .prologue
    .line 424
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writeShort(I)V

    .line 425
    return-void
.end method

.method public writeDouble(D)V
    .locals 2
    .parameter "value"

    .prologue
    .line 432
    invoke-static {p1, p2}, Ljava/lang/Double;->doubleToRawLongBits(D)J

    move-result-wide v0

    invoke-virtual {p0, v0, v1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writeLong(J)V

    .line 433
    return-void
.end method

.method public writeFloat(F)V
    .locals 1
    .parameter "value"

    .prologue
    .line 428
    invoke-static {p1}, Ljava/lang/Float;->floatToRawIntBits(F)I

    move-result v0

    invoke-virtual {p0, v0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writeInt(I)V

    .line 429
    return-void
.end method

.method public writeInt(I)V
    .locals 1
    .parameter "value"

    .prologue
    .line 414
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setInt(II)V

    .line 415
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    add-int/lit8 v0, v0, 0x4

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 416
    return-void
.end method

.method public writeLong(J)V
    .locals 1
    .parameter "value"

    .prologue
    .line 419
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v0, p1, p2}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setLong(IJ)V

    .line 420
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    add-int/lit8 v0, v0, 0x8

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 421
    return-void
.end method

.method public writeMedium(I)V
    .locals 1
    .parameter "value"

    .prologue
    .line 409
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setMedium(II)V

    .line 410
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    add-int/lit8 v0, v0, 0x3

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 411
    return-void
.end method

.method public writeShort(I)V
    .locals 1
    .parameter "value"

    .prologue
    .line 404
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    invoke-virtual {p0, v0, p1}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->setShort(II)V

    .line 405
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    add-int/lit8 v0, v0, 0x2

    iput v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 406
    return-void
.end method

.method public writeZero(I)V
    .locals 7
    .parameter "length"

    .prologue
    const/4 v6, 0x4

    const/4 v5, 0x0

    .line 486
    if-nez p1, :cond_1

    .line 510
    :cond_0
    :goto_0
    return-void

    .line 489
    :cond_1
    if-gez p1, :cond_2

    .line 490
    new-instance v3, Ljava/lang/IllegalArgumentException;

    const-string v4, "length must be 0 or greater than 0."

    invoke-direct {v3, v4}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v3

    .line 493
    :cond_2
    ushr-int/lit8 v2, p1, 0x3

    .line 494
    .local v2, nLong:I
    and-int/lit8 v1, p1, 0x7

    .line 495
    .local v1, nBytes:I
    move v0, v2

    .local v0, i:I
    :goto_1
    if-lez v0, :cond_3

    .line 496
    const-wide/16 v3, 0x0

    invoke-virtual {p0, v3, v4}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writeLong(J)V

    .line 495
    add-int/lit8 v0, v0, -0x1

    goto :goto_1

    .line 498
    :cond_3
    if-ne v1, v6, :cond_4

    .line 499
    invoke-virtual {p0, v5}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writeInt(I)V

    goto :goto_0

    .line 500
    :cond_4
    if-ge v1, v6, :cond_5

    .line 501
    move v0, v1

    :goto_2
    if-lez v0, :cond_0

    .line 502
    invoke-virtual {p0, v5}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writeByte(I)V

    .line 501
    add-int/lit8 v0, v0, -0x1

    goto :goto_2

    .line 505
    :cond_5
    invoke-virtual {p0, v5}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writeInt(I)V

    .line 506
    add-int/lit8 v0, v1, -0x4

    :goto_3
    if-lez v0, :cond_0

    .line 507
    invoke-virtual {p0, v5}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writeByte(I)V

    .line 506
    add-int/lit8 v0, v0, -0x1

    goto :goto_3
.end method

.method public writerIndex()I
    .locals 1

    .prologue
    .line 50
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    return v0
.end method

.method public writerIndex(I)V
    .locals 1
    .parameter "writerIndex"

    .prologue
    .line 54
    iget v0, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->readerIndex:I

    if-lt p1, v0, :cond_0

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->capacity()I

    move-result v0

    if-le p1, v0, :cond_1

    .line 55
    :cond_0
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v0

    .line 57
    :cond_1
    iput p1, p0, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->writerIndex:I

    .line 58
    return-void
.end method
